<?php
$inactif="60*60";
$time=time();
$query="SELECT login,last_connect FROM lnmadmin WHERE ".$time."-last <".$inactif." ORDER BY last DESC";
$result=mysql_query($query);
$num=mysql_num_rows($result);
echo "<div class=\"modOnline\"><b>Qui est en ligne?</b><br />";
for($i=0; $i<$num; $i++) {
	$pseudoEnLigne=mysql_result($result,$i,"login");
	$last=mysql_result($result,$i,"last_connect");
	$temps=floor(($time-$last)/60);
	echo '<a class="menu" href="?page=logs&niveau=1&pseudoAdmin='.$pseudoEnLigne.'">'.$pseudoEnLigne.'</a>';
	echo " (".$temps." min) <br />";
}
echo "</div>";
?>

